<template>
  <div>
      <van-nav-bar
        title="订单消息"
        left-text="返回"
        left-arrow
        @click-left="onClickLeft"
      />

      <van-cell v-for="item in list" value="内容" size="large" >
      <div class="cent">
        <div slot='title'>
          <h4>订单号:{{item._id}}</h4>
          <p>总价:{{item.price}}</p>
        </div>
        <div slot='label'>
          <h3>收货人:{{item.receiver}}</h3>
          <p>收货地址:{{item.address}}</p>
        </div>
      </div>
    </van-cell>
  </div>
</template>
<script>
import * as api from '@/api/getProList';
export default{
    name:"Dingdan",
    data () {
      return {
        list:[],
      }
    },
    methods: {
        onClickLeft() {
            this.$router.go(-1)
        },
    },
    mounted(){
      // 查询订单信息
      api.getProCate({}).then(res=>{
        if(res.status == 200){
          this.list = res.data.orders;
        }else{
        }
      });
    }
}
</script>
<style scoped>
.cent{
  background: #fafafa;
}
</style>